from django.db import models

gender_list = (
    ('Male','Male'),
    ('Female','Female'),
)
description_list = (
    ('I have breast cancer', 'I have breast cancer'),
    ('I have had breast cancer','I have had breast cancer'),
    ('Friend or relative', 'Friend or relative'),
    ('Breast care nurse', 'Breast care nurse'),
    ('Other health care professional', 'Other health care professional'),
    ('Faraja cancer support volunteer', 'Faraja cancer support volunteer'),
    ('Journalist', 'Journalist'),
    ('Faraja Cancer Support Staff', 'Faraja Cancer Support Staff'),
    ('Other','Other'),
)


class Trustee(models.Model):
    name = models.CharField(max_length=256)
    text = models.TextField()
    
    def __unicode__(self):
        return self.name
    
class Therapist(models.Model):
    name = models.CharField(max_length=256)
    picture = models.FileField(upload_to='files')
    text = models.TextField()
    
    def __unicode__(self):
        return self.name    
    
class WhoWeAre(models.Model):
    text = models.TextField()
    
    def __unicode__(self):
        return "Edit the text here!"
    
class WhatWeDo(models.Model):
    text = models.TextField()
    
    def __unicode__(self):
        return "Edit the text here!"

class WhatWeDoActivity(models.Model):
    name = models.CharField(max_length=256)
    preview_text = models.TextField()
    text = models.TextField()
    
    def __unicode__(self):
        return self.name

class Involved(models.Model):
    name = models.CharField(max_length=256)
    text = models.TextField()
    phone = models.CharField(max_length=256, null=True, blank=True)
    email = models.EmailField(null=True, blank=True)
    
    def __unicode__(self):
        return self.name

class CancerTreatment(models.Model):
    institution = models.CharField(max_length=256)
    link = models.CharField(max_length=256)
    obs = models.CharField(max_length=512, blank=True, null=True)
    
    def __unicode__(self):
        return self.institution
    

class CancerSpecific(models.Model):
    name = models.CharField(max_length=256)
    link = models.CharField(max_length=256)
    
    def __unicode__(self):
        return self.name

class Testimonial(models.Model):
    name = models.CharField(max_length=256)
    picture = models.FileField(upload_to='files')
    text = models.TextField()
    
    def __unicode__(self):
        return self.name
    
class FAQ(models.Model):
    question = models.TextField()
    answer = models.TextField()
    
    def __unicode__(self):
        return self.question
    

class MainNews(models.Model):
    order = models.IntegerField()
    text = models.CharField(max_length=256)
    picture = models.FileField(upload_to='files')
    
    def __unicode__(self):
        return self.text
    
class News(models.Model):
    date = models.DateField(auto_now=True)
    title = models.CharField(max_length=256)
    text_preview = models.TextField()
    text = models.TextField()
    thumbnail = models.FileField(upload_to='files')
    picture = models.FileField(upload_to='files')
    
    def __unicode__(self):
        return "{0}/{1}/{2} - {3}".format(self.date.day, self.date.month, self.date.year, self.title)
    
class Subscriber(models.Model):
    name = models.CharField(max_length=256)
    email = models.EmailField()
    gender = models.CharField(max_length=256,choices=gender_list, blank=True, null=True)
    date_of_birth = models.DateField(blank=True, null=True)
    city = models.CharField(max_length=256, blank=True, null=True)
    contact_phone_number = models.CharField(max_length=256, blank=True, null=True)
    what_describe_you = models.CharField(max_length=256, choices=description_list, blank=True, null=True)
    about_you = models.TextField(blank=True, null=True)
    your_likes_and_dislikes = models.TextField(blank=True, null=True)
    your_website_or_blog = models.CharField(max_length=256, blank=True, null=True)
    
    def __unicode__(self):
        return self.name